state (React)
Class (React)
がもつ状態のこと
code:jsx
class Example extends React.Component {
constructor(props) {
super(props);
this.state = { // <-- state is here
count: 0
};
}
https://ja.reactjs.org/docs/hooks-state.html#declaring-a-state-variable
長期的には
hooks (React)
の
useState
にかわっていくはず
kadoyau.icon